package com.whz.annontateddemo;

import com.google.common.collect.Lists;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: sinosoft
 * @Description: 带有一个参数的注解
 * @Date: Create in 16:35 2021/5/17
 * @Modified By:
 */
public class Sample3 {
    @ExceptionTest3({
            IndexOutOfBoundsException.class,
            NullPointerException.class
    })
    public static void doublyBad() {
        List<String> list = Lists.newArrayList();
        list.addAll(5, null);
    }
    @ExceptionTest(ArithmeticException.class)
    public static void m2() {
        int[] a = new int[0];
        int i = a[1];
    }
    @ExceptionTest(ArithmeticException.class)
    public static void m3() {

    }
}
